<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>MyWechat</title>
    <link href="__CSS__/bootstrap.min.css" rel="stylesheet">
    <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min.css" rel="stylesheet">
    <link href="__CSS__/login.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>
        // if(window.top!==window.self){window.top.location=window.location};
    </script>
    {:think\\Hook::listen('jssdk',$myJssdk,null,true);}
</head>



<body class="signin">
<div class="signinpanel">
    <div class="row">
        <div class="col-sm-7">
            <div class="signin-info">
                <div class="logopanel m-b">
                </div>
                <div class="m-b"></div>
                <h4>MyWechats</h4>
                <ul class="m-b">
                 <li>全新微信打印5.0盛大发布</li>
                </ul>
            </div>
        </div>
        <div class="col-sm-5">
            <form method="post" action="index.html">
                <input type="text" class="form-control uname" placeholder="用户名" id="name" />
                <input type="password" class="form-control pword m-b" placeholder="密码" id="password" />
                <div style="margin-bottom:70px">
                    <input type="text" class="form-control" placeholder="验证码" style="color:black;width:120px;float:left;margin:0px 0px;" name="code" id="code"/>
                    <img src="{:captcha_src()}" width="100" height="32" onclick="javascript: this.src='{:captcha_src()}?tm='+Math.random();" style="float:right;cursor: pointer"/>
                </div>
                <input class="btn btn-success btn-block" id="login_btn" value="登录"/>
            </form>
        </div>
    </div>
    <div class="signup-footer">
        <div class="pull-left">
            &copy; 2016 All Rights Reserved. My+
        </div>
    </div>
</div>
<script src="__JS__/jquery.min.js?v=2.1.4"></script>
<script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
<script src="__JS__/plugins/layer/layer.min.js"></script>
<script src="__JS__/toast.js"></script>
<script type="text/javascript">
    document.onkeydown=function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){ // enter 键
            $('#login_btn').click();
        }
    };
    var lock = false;
    $(function () {
        $('#login_btn').click(function(){
            if(lock){
                return;
            }
            lock = true;
            $('#err_msg').hide();
            $('#login_btn').removeClass('btn-success').addClass('btn-danger').val('登陆中...');
            var name = $('#name').val();
            var password = $('#password').val();
            var code = $('#code').val();
            $.post("{:url('login/doLogin')}",{'name':name, 'password':password, 'code':code},function(data){
                lock = false;
                $('#login_btn').val('登录').removeClass('btn-danger').addClass('btn-success');
                if(data.code!=1){
                    toast.error(data.msg);
                    return;
                }else{
                    // window.location.href=data.data;
                    toast.success('登录成功',data.data);
                }
            });
        });
    });
</script>

<script>
wx.ready(function() {
    var share_data = {
        title : "1111",
        desc : "2222",
        link : "3333",
        imgUrl : "",
        success : function() {
            alert('分享成功');
            //close_window();
        },
        cancel : function() {

        }
    }
    onMenuShareAppMessage(share_data);
    onMenuShareTimeline(share_data);
    onMenuShareQQ(share_data);
});
</script> 
</body>
</html>

